//
//  NSDictionary+Additions.m
//  DJFAdditionsModule
//
//  Created by LouKit on 2019/11/12.
//

#import "NSDictionary+Additions.h"

@implementation NSDictionary (Additions)

- (NSDictionary *)dj_deepCopy {
    if (!self) return nil;
    if (![self isKindOfClass:[NSDictionary class]]) return nil;
    if (self.count == 0) return [self mutableCopy];
    
    NSDictionary *obj = nil;
    
    @try {
        obj = [NSKeyedUnarchiver unarchiveObjectWithData:[NSKeyedArchiver archivedDataWithRootObject:self]];
    }
    @catch (NSException *exception) {
        NSLog(@"%@", exception);
    }
    return obj;
}



@end
